#pragma once
#include "dll_export.h"
#include "Mediator.h"
#include <wx/frame.h>

LUA_DEBUG_BEGIN

class VariableWatch;

/**
* @brief Show contents of the one specific variable.
*/
class _LUADBG_API OneVariableWatchView : public wxFrame
{
    DECLARE_EVENT_TABLE();

    Mediator_ptr m_mediator;
    VariableWatch *m_watch;
    bool m_wasInMouse;

    struct VariableRequester;
    struct CallbackHandler;

public:
    explicit OneVariableWatchView(Mediator_ptr mediator,
        wxWindow *parent,
        const wxString &valName,
        const wxPoint &pos,
        const wxSize &size);
    virtual ~OneVariableWatchView();

    /// Was the mouse pointer in this control ?
    bool WasInMouse() const {
        return m_wasInMouse;
    }

private:
    void SetHandler(wxWindow *target);
    void OnMotion(wxMouseEvent &event);
};

LUA_DEBUG_END
